﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightApplication1.DataTypes
{
    public class TextLanguage
    {
        public enum fields
        {
            key_title,
            key_signin,
            key_change_used,
            search,
            lnk_language,
            btn_left_1,
            btn_left_2,
            btn_left_3,
            adv_lnk,
            adv_title,
            adv_sortby,
            adv_sort_price,
            adv_sort_price_asc,
            adv_sort_price_dsc,
            adv_sort_pubdate,
            adv_sort_title,
            adv_filteredby,
            adv_filt_author,
            adv_filt_publisher,
            adv_filt_title,
            adv_filt_category,
            adv_filt_cat_LF,
            adv_filt_cat_medicine,
            adv_filt_cat_MT,
            adv_filt_cat_nonfiction,
            adv_filt_cat_ON,
            adv_filt_condition,
            adv_filt_cond_all,
            adv_filt_cond_used,
            adv_filt_cond_coll,
            adv_filt_cond_refu,            
            adv_filt_keyword,
            adv_filt_maxprice,
            adv_filt_minprice,
            adv_sort_first,
            adv_sort_second,
            adv_sort_third,
            adv_sort_fLPrice,
            adv_sort_fPublication,
            adv_sort_fTitle,
            adv_sort_sLPrice,
            adv_sort_sPublication,
            adv_sort_sTitle,
            adv_sort_tLPrice,
            adv_sort_tPublication,
            adv_sort_tTitle,
            adv_change_confirm,
            adv_change_cancel,
            adv_clean
        }

        public TextLanguage() { }

        public string GetText(TextLanguage.fields field, int language)
        {
            string text = "";
            switch (language)
            {
                case 1:
                    text = GetTextEnglish(field);
                    break;
                case 2:
                    text = GetTextSpanish(field);
                    break;
            }
            return text;
        }

        private string GetTextEnglish(fields field)
        {
            string text = "";

            switch (field)
            {
                case fields.key_title:
                    text = "Amazon Key";
                    break;
                case fields.key_signin:
                    text = "Sign In";
                    break;
                case fields.key_change_used:
                    text = "Change Key Used";
                    break;
                case fields.search:
                    text = "Search";
                    break;
                case fields.lnk_language:
                    text = "Español";
                    break;
                case fields.btn_left_1:
                    text = "";
                    break;
                case fields.btn_left_2:
                    text = "";
                    break;
                case fields.btn_left_3:
                    text = "";
                    break;
                case fields.adv_lnk:
                    text = "Advanced Search";
                    break;
                case fields.adv_title:
                    text = "Advanced Search";
                    break;
                case fields.adv_sortby:
                    text = "Sort by";
                    break;
                case fields.adv_sort_price:
                    text = "List Price";
                    break;
                case fields.adv_sort_price_asc:
                    text = "asc";
                    break;
                case fields.adv_sort_price_dsc:
                    text = "desc";
                    break;
                case fields.adv_sort_pubdate:
                    text = "Publication";
                    break;
                case fields.adv_sort_title:
                    text = "Title";
                    break;
                case fields.adv_filteredby:
                    text = "Filtered by";
                    break;
                case fields.adv_filt_author:
                    text = "Author:";
                    break;
                case fields.adv_filt_publisher:
                    text = "Publisher:";
                    break;
                case fields.adv_filt_title:
                    text = "Title:";
                    break;
                case fields.adv_filt_category:
                    text = "Category:";
                    break;
                case fields.adv_filt_cat_LF:
                    text = "Literature and Fiction:";
                    break;
                case fields.adv_filt_cat_medicine:
                    text = "Medicine:";
                    break;
                case fields.adv_filt_cat_MT:
                    text = "Mystery and Thrillers:";
                    break;
                case fields.adv_filt_cat_nonfiction:
                    text = "Nonfiction:";
                    break;
                case fields.adv_filt_cat_ON:
                    text = "Outdoors and Nature:";
                    break;
                case fields.adv_filt_condition:
                    text = "Condition:";
                    break;
                case fields.adv_filt_cond_all:
                    text = "All";
                    break;
                case fields.adv_filt_cond_used:
                    text = "Used";
                    break;
                case fields.adv_filt_cond_coll:
                    text = "Collectible";
                    break;
                case fields.adv_filt_cond_refu:
                    text = "Refurbished";
                    break;
                case fields.adv_filt_keyword:
                    text = "Keyword:";
                    break;
                case fields.adv_filt_maxprice:
                    text = "Maximum Price:";
                    break;
                case fields.adv_filt_minprice:
                    text = "Minimum Price:";
                    break;
                case fields.adv_sort_first:
                    text = "First by:";
                    break;
                case fields.adv_sort_second:
                    text = "Second by:";
                    break;
                case fields.adv_sort_third:
                    text = "Third by:";
                    break;
                case fields.adv_sort_fLPrice:
                    text = "List Price";
                    break;
                case fields.adv_sort_fPublication:
                    text = "Publication";
                    break;
                case fields.adv_sort_fTitle:
                    text = "Title";
                    break;
                case fields.adv_sort_sLPrice:
                    text = "List Price";
                    break;
                case fields.adv_sort_sPublication:
                    text = "Publication";
                    break;
                case fields.adv_sort_sTitle:
                    text = "Title";
                    break;
                case fields.adv_sort_tLPrice:
                    text = "List Price";
                    break;
                case fields.adv_sort_tPublication:
                    text = "Publication";
                    break;
                case fields.adv_sort_tTitle:
                    text = "Title";
                    break;
                case fields.adv_change_confirm:
                    text = "Ok";
                    break;
                case fields.adv_change_cancel:
                    text = "Cancel";
                    break;
                case fields.adv_clean:
                    text = "clean";
                    break;
            }
            return text;

        }

        private string GetTextSpanish(fields field)
        {
            string text = "";

            switch (field)
            {
                case fields.key_title:
                    text = "Clave de Amazon";
                    break;
                case fields.key_signin:
                    text = "Registrarse";
                    break;
                case fields.key_change_used:
                    text = "Usar otra clave";
                    break;
                case fields.search:
                    text = "Buscar";
                    break;
                case fields.lnk_language:
                    text = "English";
                    break;
                case fields.btn_left_1:
                    text = "";
                    break;
                case fields.btn_left_2:
                    text = "";
                    break;
                case fields.btn_left_3:
                    text = "";
                    break;
                case fields.adv_lnk:
                    text = "Búsqueda Avanzada";
                    break;
                case fields.adv_title:
                    text = "Búsqueda Avanzada";
                    break;
                case fields.adv_sortby:
                    text = "Ordenar por";
                    break;
                case fields.adv_sort_price:
                    text = "Lista de Precio";
                    break;
                case fields.adv_sort_price_asc:
                    text = "Ascendente";
                    break;
                case fields.adv_sort_price_dsc:
                    text = "Descendente";
                    break;
                case fields.adv_sort_pubdate:
                    text = "Publicación";
                    break;
                case fields.adv_sort_title:
                    text = "Título";
                    break;
                case fields.adv_filteredby:
                    text = "Filtrar por";
                    break;
                case fields.adv_filt_author:
                    text = "Autor:";
                    break;
                case fields.adv_filt_publisher:
                    text = "Editorial:";
                    break;
                case fields.adv_filt_title:
                    text = "Título:";
                    break;
                case fields.adv_filt_category:
                    text = "Categoría:";
                    break;
                case fields.adv_filt_cat_LF:
                    text = "Literatura y Ficción:";
                    break;
                case fields.adv_filt_cat_medicine:
                    text = "Medicina:";
                    break;
                case fields.adv_filt_cat_MT:
                    text = "Misterio y Suspenso:";
                    break;
                case fields.adv_filt_cat_nonfiction:
                    text = "No ficción:";
                    break;
                case fields.adv_filt_cat_ON:
                    text = "Naturaleza:";
                    break;
                case fields.adv_filt_condition:
                    text = "Condición:";
                    break;
                case fields.adv_filt_cond_all:
                    text = "Todas";
                    break;
                case fields.adv_filt_cond_used:
                    text = "Usado";
                    break;
                case fields.adv_filt_cond_coll:
                    text = "Coleccionable";
                    break;
                case fields.adv_filt_cond_refu:
                    text = "Restaurado";
                    break;
                case fields.adv_filt_keyword:
                    text = "Clave:";
                    break;
                case fields.adv_filt_maxprice:
                    text = "Precio Máximo:";
                    break;
                case fields.adv_filt_minprice:
                    text = "Precio Mínimo:";
                    break;
                case fields.adv_sort_first:
                    text = "Primero:";
                    break;
                case fields.adv_sort_second:
                    text = "Segundo:";
                    break;
                case fields.adv_sort_third:
                    text = "Tercero:";
                    break;
                case fields.adv_sort_fLPrice:
                    text = "Precio";
                    break;
                case fields.adv_sort_fPublication:
                    text = "Publicación";
                    break;
                case fields.adv_sort_fTitle:
                    text = "Titulo";
                    break;
                case fields.adv_sort_sLPrice:
                    text = "Precio";
                    break;
                case fields.adv_sort_sPublication:
                    text = "Publicación";
                    break;
                case fields.adv_sort_sTitle:
                    text = "Titulo";
                    break;
                case fields.adv_sort_tLPrice:
                    text = "Precio";
                    break;
                case fields.adv_sort_tPublication:
                    text = "Publicación";
                    break;
                case fields.adv_sort_tTitle:
                    text = "Titulo";
                    break;
                case fields.adv_change_confirm:
                    text = "Aceptar";
                    break;
                case fields.adv_change_cancel:
                    text = "Cancelar";
                    break;
                case fields.adv_clean:
                    text = "limpiar";
                    break;
            }
            return text;
        }
    }
}
